$(function(){
	var year = new Date().getFullYear();
	var month = new Date().getMonth();
	if(month<10)
		month = "0"+month
	var date = (year+"-"+month);
	var empid = $(".He_text_t").attr("id");
	//初始化表格
	$('#JiaBandg').datagrid({
	    url:'YuanGongJiaBan',
	    queryParams:{
	    	EMPID:empid,
	    	DATE:date
	    },
	    columns:[[
			{field:'RESID',width:1,checkbox:true,title:'考勤编号',align:'center'},
			{field:'CWASID',width:1,title:'所属考勤卡',align:'center'},
			{field:'EMPNAME',width:1,title:'员工姓名',align:'center'},
			{field:'DEPTNAME',width:1,title:'部门',align:'center'},
			{field:'TEMNAME',width:1,title:'班组',align:'center'},
			{field:'QTSTIME',width:2,title:'申请加班时间',align:'center'},
			{field:'RESMINTIME',title:'打卡签到',width:2,align:'center',
				formatter: function(value,row,index){
					return new Date(value).getFullYear() + '-' + (new Date(value).getMonth() + 1) + '-' + new Date(value).getDate() + ' ' + new Date(value).getHours() + ':' + new Date(value).getMinutes() + ':' + new Date(value).getSeconds();
				}
			},
			{field:'RESMAXTIME',title:'打卡签退',width:2,align:'center',
				formatter: function(value,row,index){
					return new Date(value).getFullYear() + '-' + (new Date(value).getMonth() + 1) + '-' + new Date(value).getDate() + ' ' + new Date(value).getHours() + ':' + new Date(value).getMinutes() + ':' + new Date(value).getSeconds();
				}
			},
			{field:'RESTIME',title:'上班时长',width:1,align:'center'},
			{field:'RSNREASON',width:1,title:'加班原因',align:'center'},
			{field:'RESREM',width:1,title:'备注',align:'center'}
	    ]],
	    pagination:true,
	    pageNumber:1,
	    pageSize:5,
	    pageList:[5,10,15]
	});
});